#include "framework/Manager.hpp"
#include "MessageBox.hpp"
#include "UnderlinePen.hpp"

int main(int argc, char *argv[]) {
    // 准备
    Manager* manager = new Manager();
    UnderlinePen* upen = new UnderlinePen('~');
    MessageBox* mbox = new MessageBox('*');
    MessageBox* sbox = new MessageBox('/');
    manager->register_("strong message", upen);
    manager->register_("warning box", mbox);
    manager->register_("slash box", sbox);

    // 生成
    Product* p1 = manager->create("strong message");
    p1->use("Hello, world.");
    Product* p2 = manager->create("warning box");
    p2->use("Hello, world.");
    Product* p3 = manager->create("slash box");
    p3->use("Hello, world.");
}
